//
//  WebViewViewController.m
//  WebView
//

#import "WebViewViewController.h"

@implementation WebViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	[self.view setBackgroundColor:[UIColor blackColor]];
	
	CGRect webRect = CGRectMake(10, 10, 300, 380);
	UIWebView *myWebView = [[UIWebView alloc] initWithFrame:webRect];
	
	myWebView.scalesPageToFit = NO;
	NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"myPage" ofType:@"html"];
	NSString *htmlContent = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil];
	[myWebView loadHTMLString:htmlContent baseURL:nil];
	
	[self.view addSubview:myWebView];
	[myWebView release];
}

- (void)dealloc {
    [super dealloc];
}

@end
